<?php
namespace app\index\controller;
use app\index\controller\Base;
use think\Db;

// 前台首页
class Index extends Base
{
    public function index()
    {
        $articles = Db::name('article')
            ->order('id desc')
            ->paginate(10);
        $this->assign('articles',$articles);

        return $this->fetch();

    }
}
